<template>
    <view class="list data-v-11b3eeb7">
        <view
            @tap="__e"
            :class="['item', 'data-v-11b3eeb7', !line ? 'disableLine' : '']"
            :data-event-opts="[['tap', [['toProductDetail', ['$0'], [[['list', 'uuid', item.uuid]]]]]]]"
            v-for="(item, index) in list"
            :key="index"
        >
            <view class="thumb-c data-v-11b3eeb7">
                <image :class="['p-tag', 'data-v-11b3eeb7', theme + ' ' + grid + ' location-' + item.image_tag.location]" :src="item.image_tag.image" v-if="item.image_tag"></image>
                <image class="thumb data-v-11b3eeb7" mode="aspectFill" :src="item.thumb + '?x-oss-process=image/resize,w_500'"></image>
                <view class="presell-c data-v-11b3eeb7" v-if="item.is_presell">预售</view>
                <view class="empty-stock data-v-11b3eeb7" v-if="item.stock === 0">
                    <image class="data-v-11b3eeb7" mode="widthFix" src="/static/empty-stock.png"></image>
                </view>
            </view>

            <view class="right data-v-11b3eeb7">
                <view class="title data-v-11b3eeb7">
                    <text class="title-tag data-v-11b3eeb7" v-if="item.item_type === 'box'">盲盒</text>
                    <block v-else>
                        <text class="title-tag activity data-v-11b3eeb7" v-if="item.item_type === 'activity'">活动</text>
                    </block>
                    {{ '' + item.title + '' }}
                </view>
                <view class="tag-list data-v-11b3eeb7">
                    <view class="tag-item data-v-11b3eeb7" v-for="(item, index1) in item.tags" :key="index1">{{ item }}</view>
                </view>
                <view class="price-c data-v-11b3eeb7">
                    <price-display @__l="__l" class="data-v-11b3eeb7" :info="item" :vueId="'06db54dd-1-' + index"></price-display>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
import priceDisplay from '@/components/PriceDisplay/PriceDisplay';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['pages/search/components/list'],
    {
        2125: function (e, t, n) {
            'use strict';

            var a = n('6132');
            n.n(a).a;
        },
        6132: function (e, t, n) {},
        '6f0a': function (e, t, n) {
            'use strict';

            n.r(t);
            var a = n('e8a3');
            var i = n('fce5');
            for (var c in i) {
                if (['default'].indexOf(c) < 0) {
                    (function (e) {
                        n.d(t, e, function () {
                            return i[e];
                        });
                    })(c);
                }
            }
            n('2125');
            var o = n('f0c5');
            var u = Object(o.a)(i.default, a.b, a.c, false, null, '11b3eeb7', null, false, a.a, void 0);
            t.default = u.exports;
        },
        '79da': function (e, t, n) {
            'use strict';

            (function (e) {
                Object.defineProperty(t, '__esModule', {
                    value: true
                });
                t.default = void 0;
                var n = {
                    name: 'ProductList',
                    props: {
                        list: {
                            type: Array
                        },
                        line: {
                            type: Boolean,
                            default: function () {
                                return true;
                            }
                        }
                    },
                    data: function () {
                        return {
                            theme: 'default',
                            grid: 'default-grid'
                        };
                    },
                    methods: {
                        toProductDetail: function (t) {
                            console.log('click ====>', t);
                            var n = '';
                            if ('product' == t.item_type) {
                                n = '/pages/productDetail/index?uuid=' + t.uuid;
                            } else {
                                if ('box' == t.item_type) {
                                    n = '/pages/boxDetail/index?uuid=' + t.uuid;
                                } else {
                                    if ('activity' == t.item_type) {
                                        n =
                                            'egg_lottery' === t.type
                                                ? '/pages/eggLottery/detail?uuid='.concat(t.uuid)
                                                : '/pages/'.concat(t.type, 'Activity/detail?uuid=').concat(t.uuid);
                                    }
                                }
                            }
                            e.navigateTo({
                                url: n
                            });
                        }
                    }
                };
                t.default = n;
            }.call(this, n('543d').default));
        },
        e8a3: function (e, t, n) {
            'use strict';

            n.d(t, 'b', function () {
                return i;
            });
            n.d(t, 'c', function () {
                return c;
            });
            n.d(t, 'a', function () {
                return a;
            });
            var a = {
                PriceDisplay: function () {
                    return n.e('components/PriceDisplay/PriceDisplay').then(n.bind(null, '6b05'));
                }
            };
            var i = function () {
                this.$createElement;
                this._self._c;
            };
            var c = [];
        },
        fce5: function (e, t, n) {
            'use strict';

            n.r(t);
            var a = n('79da');
            var i = n.n(a);
            for (var c in a) {
                if (['default'].indexOf(c) < 0) {
                    (function (e) {
                        n.d(t, e, function () {
                            return a[e];
                        });
                    })(c);
                }
            }
            t.default = i.a;
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'pages/search/components/list-create-component',
    {
        'pages/search/components/list-create-component': function (e, t, n) {
            n('543d').createComponent(n('6f0a'));
        }
    },
    [['pages/search/components/list-create-component']]
]);
</script>
<style>
@import './list.css';
</style>
